package cn.tedu.user.management.dao.persist.mapper;

import cn.tedu.user.management.pojo.entity.UserRole;
import cn.tedu.user.management.pojo.vo.UserRoleStandardVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

public interface UserRoleMapper extends BaseMapper<UserRole> {

    /*
     * 根据user_id删除用户角色关联
     */
    int deleteByUserId(Long id);

    /*
     *   根据id查询员工角色
     */
    UserRoleStandardVO getUserRoleById(Long id);

    /*
    *根据user_id获取role_id
    */
    Long getRoleIdByUserId(Long id);

    /*
     *根据user_id修改role_id
     */
    int updateByUserId(Long userId, Long roleId);
}




